home *** CD-ROM | disk | FTP | other *** search
/ Languguage OS 2 / Languguage OS II Version 10-94 (Knowledge Media)(1994).ISO / language / awe / awe-full.lha / Awe2 / DoNotUseThisSrc / MultiSimMux.h < prev    next >
C/C++ Source or Header  |  1990-08-08  |  1KB  |  51 lines

  1. // This may look like C code, but it is really -*- C++ -*-
  2. // 
  3. // Copyright (C) 1988 University of Illinois, Urbana, Illinois
  4. //
  5. // written by Dirk Grunwald (grunwald@cs.uiuc.edu)
  6. //
  7. #ifndef MultiMuxCpu_h
  8. #define MultiMuxCpu_h
  9. #ifdef __GNUG__
  10. #  pragma once
  11. #  pragma interface
  12. #endif
  13.  
  14. #include <SimulationMultiplexor.h>
  15. #include <MultiCpuMux.h>
  16. #include <HardwareContext.h>
  17.  
  18. //
  19. //    Like it says.
  20. //
  21. extern double CurrentSimulatedTime;
  22. extern const double NullTime;
  23.  
  24. class SpinBarrier;
  25. class TimeSchedulerPQ;
  26.  
  27. class MultiSimMux : public SimulationMultiplexor, public MultiCpuMux {
  28. protected:
  29. //    MultiCpuMux multiCpu;
  30.  
  31.     SpinLock *myPendingEventsLock;
  32.     SpinBarrier *cpuBarrier;
  33.  
  34.     virtual int advanceTime();
  35.  
  36.     void allocateLocalEventStructures(int,int);
  37.  
  38.     virtual void allocateEventStructures(int,int);
  39.     virtual void deallocateEventStructures();
  40.  
  41. public:
  42.     MultiSimMux(int debug = 0, int barrierMaxLoops = 0);
  43.  
  44.     virtual void fireItUp(int Cpus = 1, unsigned shared = (4196 * 500));
  45.     virtual void warmThePot(int);
  46.     virtual void stirItAround();
  47.     virtual void coolItDown();
  48. };
  49.  
  50. #endif /* MultiMuxCpu_h */
  51.